import request from '@/utils/request'
const service_name = 'blog'
export default {
  save(about) { // 添加
    return request({
      url: `/${service_name}/about`,
      method: 'post',
      data: about
    })
  },
  getList(query) { // 查询
    return request({
      url: `/${service_name}/about/list`,
      method: 'get',
      params: query
    })
  },
  update(about) { // 更新
    return request({
      url: `/${service_name}/about`,
      method: 'put',
      data: about
    })
  },
  deleteById(ids) { // 删除
    return request({
      url: `/${service_name}/about/delete/`+ ids,
      method: 'delete'
    })
  },
  get(id) { // 根据id查询
    return request({
      url: `/${service_name}/about/get/${id}`,
      method: 'get'
    })
  },
  getAboutInfo() { // 获取启用中的
    return request({
      url: `/${service_name}/about/getAboutInfo`,
      method: `get`
    })
  },
  enableById(id) { // 根据id启用
    return request({
      url: `/${service_name}/about/enable/${id}`,
      method: `put`
    })
  },
  disableById(id) { // 根据id弃用
    return request({
      url: `/${service_name}/about/disable/${id}`,
      method: `put`
    })
  }
}
